<!DOCTYPE html>
<html lang="en">
<head>
    <tc_include file="Public:head" />
    <title>{$name} {$seo_title} {$site_name}</title>
    <meta name="keywords" content="{$seo_keywords}" />
    <meta name="description" content="{$seo_description}">
    <!--common-->
    <link rel="stylesheet" href="__TMPL__Public/css/common.css">
    <link href="__PUBLIC__/TciocEx/css/style-responsive.css" rel="stylesheet">
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="__PUBLIC__/TciocEx/js/html5shiv.js"></script>
    <script src="__PUBLIC__/TciocEx/js/respond.min.js"></script>
    <![endif]-->
    <!-- Placed js at the end of the document so the pages load faster -->
    <script src="__PUBLIC__/TciocEx/js/jquery-1.10.2.min.js"></script>
    <script src="__PUBLIC__/TciocEx/js/bootstrap.min.js"></script>
    <!-- 必须引入的文件 -->
    <link rel="stylesheet" href="__PUBLIC__/js/nprogress/nprogress.css">
    <script src="__PUBLIC__/js/jquery.pjax/jquery.pjax.js"></script>
    <script src="__PUBLIC__/js/nprogress/nprogress.js"></script>
    <style>
        .banner{
            width: 100%;
            height: 280px;

        }
        a{color: #333333;text-decoration:none;}
        a:hover{text-decoration:none;}
        .news_list{
            /*overflow: hidden;*/
            padding-bottom: 50px;
            height: auto;
            min-height: 100%;
            _height:100%;
        }
        .right_content{
            overflow: hidden;
            margin-top: 30px;
            float: right;
            width: 82%;
            min-width: 900px;
            margin-bottom: 50px;
        }
        .right_content_ul{  width:100%;}
        .right_content_li{
            width: 30%;
            height: 315px;
           margin-left: 3%;
            float: left;
            list-style: none;
            border: 0;
            border-bottom: 1px solid #999999;
        }
        .list-img { width:  302px ;  height: 164px;margin:20px auto 15px auto ; text-align:center;overflow: hidden ;border: 1px solid #e0e0e0; }
        /*.list-img { max-width:  100% ;  max-height: 163px;margin-top: 20px ;margin-bottom: 15px; text-align:center;overflow: hidden  }*/
        .list-img img{width: 100%;overflow-y: hidden}
        .title{font-size: 18px;font-weight:bold;line-height: 28px;text-align: center;padding-top: 12px}
        .p1{font-size: 14px;line-height: 24px;color: #999999}
        .page {margin:40px 0 80px 0;}

    </style>

</head>
<body>
<tc_include file="Public:nav" />
<php> $equipment=sp_getslide("equipment");</php>
<if condition="!empty($equipment[0]['slide_pic'])">
    <div class="banner" style=" background: url('{:sp_get_image_preview_url($equipment[0]['slide_pic'])}')no-repeat 100% 10%;"></div>
    <else />
    <div class="banner" style=" height: 50px;"></div>
</if>

<div class="news_list" style="min-width: 1200px;width: 60%;margin: 0 auto;">
    <php>
        $term_id=$_GET['id'];
        $term=sp_get_term($term_id );//获取当前分类信息
        $path=preg_split("/-|and/", $term['path']);
        $term_list=sp_get_child_terms($path['1']);
        $terms=sp_get_term($path['1']);//获取一级分类信息
        $term_name=sp_get_term($path['2'] );//获取二级分类信息
        array_unshift($term_list,array('term_id'=>$path['1'],'name'=>'全部'));
        $lists=sp_sql_posts_paged_bycatid($term_id,"order:istop desc,listorder DESC,post_modified DESC;",6,"{liststart}{list}{listend}");

    </php>
    <div class="slide-nav">
        <div class="title">
            <div class="ch">{$terms['name']}</div>
            <div class="en">{$terms['slug']}</div>
        </div>
        <div class="content">
            <ul>
                <volist name="term_list" id="te" key="k">
                     <li <eq  name='term_id' value='$te.term_id'> class="active"</eq> ><a href="{:leuu('list/index',array('id'=>$te['term_id']))}" data-pjax="true" >{$te.name}</a></li>
                </volist>
            </ul>
        </div>

    </div>
    <div class="right_content">
        <div class="row">
            <ul class="right_content_ul">
                <volist name="lists['posts']" id="vo" key="k">
                    <php> $smeta=json_decode($vo['smeta'],true);</php>
                    <li class="right_content_li">
                        <a href="{:leuu('article/index',array('id'=>$vo['object_id'],'cid'=>$vo['term_id']))}">
                            <div class="list-img">
                                <if condition="!empty($smeta['thumb'])">
                                    <img src="{:sp_get_asset_upload_path($smeta['thumb'])}"  height="100%" >
                                    <else />
                                    <img src="__TMPL__Public/images/equipment/list1.png" alt="" height="100%">
                                </if>
                            </div>
                            <P class="title">{$vo.post_title}</P>
                            <p class="p1">{:msubstr($vo['post_excerpt'],0,45)}</p>
                        </a>
                    </li>
                </volist>

            </ul>
        </div>
        <div class="text-center">
            <ul class="pagination">
                {$lists['page']}
            </ul>
        </div>
    </div>

</div>
<tc_include file="Public:footer" />

</body>
</html>
<script>
    $(function () {
        $('.slide-nav .content ul li:eq(-1)').css("border-bottom","none ");
    })
</script>
<script>
    $(function(){
        /* 使用pjax + NProgress 插件  */
        //$(document).pjax('a[data-pjax="true"]',"#content",{scrollTo:false,type:"post"});
        $.pjax.defaults.timeout = 3000;
        $(document).pjax('a[data-pjax="true"]',".news_list",{scrollTo:false,type:"post",fragment:('.news_list'),show:'fade'});
        NProgress.configure({showSpinner: false});
        NProgress.start();
        $(window).load(function() {NProgress.done();});
        $(document).on('pjax:start', function() { NProgress.start(); });
        $(document).on('pjax:end',   function() { NProgress.done(); });
    });
</script>